package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.List;

/**
 *角色表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_admin_role")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AdminRoleModel {
    @TableId(type = IdType.AUTO)
    private Integer id; //角色表ID
    private String roleName;//角色名称
    private String rules;//管理权限(menus_id)
    private Integer status;//状态,1正常 0隐藏

    @TableField(exist = false)
    private List<String> permissionList;//权限数组

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;
}
